Skip to content

feat: install custom Linux ISO and rootfs images - #4

Open
pdev-labs wants to merge 1 commit into
mainfrom
custom
Open

pdev-labs wants to merge 1 commit into
mainfrom
custom

Conversation

@pdev-labs

Copy link
Copy Markdown
Owner

What does this change?

Adds custom Linux userland installs. Guided setup gains option 9, and
lfa install gains --iso PATH and --rootfs PATH. A rootfs tarball, an
extracted directory, or a live ISO is unpacked and runs under proot next to
the eight built-in distros.

Why?

The installer only offered the eight proot-distro aliases, and the README
explicitly said arbitrary rootfs tarballs were unsupported. Users with an
arm64 live ISO or a vendor rootfs had no supported path.

How was it tested?

  • ./tests/test-all.sh passes locally (PASS=917 FAIL=0)
  • shellcheck -S warning install_linux.sh tests/test-all.sh is clean
  • Exercised on a real device (state device, Android version, distro, backend)

Device / distro / backend used: host suite only; no on-device custom-ISO run yet.

The new Y12-Y12f tests cover a known-family tarball, an unknown package
manager, a live ISO with a squashfs, wrong-architecture refusal, CLI source
validation, and the guided custom flow.

Checklist

  • No secrets, passwords, or personal paths in the diff or logs
  • Docs updated if behaviour or the test count changed
  • README.md numbers still match the suite (the suite enforces this)

Add a ninth guided-setup option and `lfa install --iso/--rootfs` so a
user-supplied userland can run under proot next to the built-in distros.

- Accept rootfs tarballs, extracted directories, live ISOs and raw
  images; extract the live squashfs (including Fedora's nested ext4)
  with unsquashfs when available and 7z as the fallback.
- Check the CPU architecture before installing, since proot cannot
  emulate another CPU.
- Read /etc/os-release, map the image to a package-manager family and
  reuse the normal desktop/software setup. Unknown families install
  terminal-only instead of calling a package manager that is absent.
- Stage the extracted tree during guided setup so the family is known
  before the desktop and software menus, then move it into the
  proot-distro layout. Clean the stage and temporary extraction
  directories on interrupt.
- Reject tar members with absolute or parent-relative paths, and handle
  zipped rootfs trees with a single top-level directory.
- Record CUSTOM_SOURCE, CUSTOM_NAME and CUSTOM_ID in the guest config.

Tests cover a known-family tarball, an unknown family, a live ISO,
wrong-architecture refusal, CLI validation and the guided flow. The
host suite is now 917 checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant